home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir36
/
bat_form.zip
/
BAT_FORM.BTM
next >
Wrap
Text File
|
1993-09-02
|
7KB
|
198 lines
@echo off
SET Fore=%_FG^ SET Back=%_BG
If "%@Upper[%1]" == "?" .OR. "%@Upper[%1]" == "H" .OR. "%@Upper[%1]" == "/H" .OR. %1 == "-H" .OR. "%@Upper[%1]" == "/?" .OR. %1 == "-?" Goto Usage
Set Drive=
Set Size=
Iff "%1" == "A" Then^ Set Drive=a
ElseIff "%1" == "B" Then^ Set Drive=b
ElseIff "%1" == "1" Then^ Set Size=1
ElseIff "%1" == "2" Then^ Set Size=2
ElseIff "%1" == "3" Then^ Set Size=3
ElseIff "%1" == "4" Then^ Set Size=4
ElseIff "%1" == "5" Then^ Set Size=5
ElseIff "%1" == "1.44" Then^ Set Size=1
ElseIff "%1" == "1.2" Then^ Set Size=2
ElseIff "%1" == "720" Then^ Set Size=3
ElseIff "%1" == "360" Then^ Set Size=4
ElseIff "%1" == "2.88" Then^ Set Size=5
ElseIff "%1" == "144" Then^ Set Size=1
ElseIff "%1" == "12" Then^ Set Size=2
ElseIff "%1" == "288" Then^ Set Size=5
EndIff
Iff "%2" == "1" Then^ Set Size=1
ElseIff "%2" == "2" Then^ Set Size=2
ElseIff "%2" == "3" Then^ Set Size=3
ElseIff "%2" == "4" Then^ Set Size=4
ElseIff "%2" == "5" Then^ Set Size=5
ElseIff "%2" == "1.44" Then^ Set Size=1
ElseIff "%2" == "1.2" Then^ Set Size=2
ElseIff "%2" == "720" Then^ Set Size=3
ElseIff "%2" == "360" Then^ Set Size=4
ElseIff "%2" == "2.88" Then^ Set Size=5
ElseIff "%2" == "144" Then^ Set Size=1
ElseIff "%2" == "12" Then^ Set Size=2
ElseIff "%2" == "288" Then^ Set Size=5
ElseIff "%2" == "A" Then^ Set Drive=a
ElseIff "%2" == "B" Then^ Set Drive=b
EndIff
rem
rem Save the current screen color settings, then...
rem Clear the screen to bright cyan on White and put the initial
rem screen information on the screen
rem
cls Bright Cyan on White border White
Drawbox 09 21 15 60 1 Bright White on Cyan Fill Cyan Shadow
Drawbox 05 25 08 55 4 Bright Cyan on Blue Fill Blue Shadow
Drawbox 00 30 02 49 2 Bright White on Red Fill Red Shadow
ScrPut 01 33 Bright White on Red "
ScrPut 01 34 Bright Yellow on Red Batch Format
ScrPut 01 46 Bright White on Red "
ScrPut 06 30 Bright Cyan on Blue Floppy Drive
ScrPut 06 43 White on Blue [
ScrPut 06 44 Bright Yellow on Blue A
ScrPut 06 45 White on Blue |
ScrPut 06 46 Bright Yellow on Blue B
ScrPut 06 47 White on Blue ]
ScrPut 06 48 Bright White on Blue :
ScrPut 07 32 Bright Cyan on Blue Floppy Density
ScrPut 07 46 Bright White on Blue :
ScrPut 10 27 Bright Yellow on Cyan 1
ScrPut 10 28 Bright Cyan on Cyan )
ScrPut 10 30 Black on Cyan 1.44
ScrPut 10 34 Blue on Cyan M
ScrPut 10 36 Bright Cyan on Cyan 3½" High Density
ScrPut 11 27 Bright Yellow on Cyan 2
ScrPut 11 28 Bright Cyan on Cyan )
ScrPut 11 30 Black on Cyan 1.2
ScrPut 11 34 Blue on Cyan M
ScrPut 11 36 Bright Cyan on Cyan 5¼" High Density
ScrPut 12 27 Bright Yellow on Cyan 3
ScrPut 12 28 Bright Cyan on Cyan )
ScrPut 12 31 Black on Cyan 720
ScrPut 12 34 Blue on Cyan k
ScrPut 12 36 Bright Cyan on Cyan 3½" Double Density
ScrPut 13 27 Bright Yellow on Cyan 4
ScrPut 13 28 Bright Cyan on Cyan )
ScrPut 13 31 Black on Cyan 360
ScrPut 13 34 Blue on Cyan k
ScrPut 13 36 Bright Cyan on Cyan 5¼" Double Density
ScrPut 14 27 Bright Yellow on Cyan 5
ScrPut 14 28 Bright Cyan on Cyan )
ScrPut 14 30 Black on Cyan 2.88
ScrPut 14 34 Blue on Cyan M
ScrPut 14 36 Bright Cyan on Cyan 3½" Extra Density
rem
rem Position the cursor, erase anything left after the prompts on
rem the lines, and get the keystrokes in response to the Drive and
rem Density options...
rem
:ReStart
If "%Drive" NE "" Goto WhichSize
Color Bright White on Blue
Screen 06 50
Inkey /k"AB[Esc]" %%Drive
If "%Drive" == "" Goto The_End
:WhichSize
ScrPut 06 50 Bright Yellow on Blue %@Upper[%Drive]
If "%Size" NE "" Goto SetSize
Color Bright White on Blue
Screen 07 48
Inkey /k"12345[Esc]" %%Size
If "%Size" == "" Goto The_End
:SetSize
ScrPut 07 48 Bright Yellow on Blue %@Upper[%Size]
Iff "%Size" == "1" then
Set Option=/F:1.44
ElseIff "%Size" == "2" then
Set Option=/F:1.2
ElseIff "%Size" == "3" then
Set Option=/F:720
ElseIff "%Size" == "4" then
Set Option=/F:360
ElseIff "%Size" == "5" then
Set Option=/F:2.88
Else Set Option=
EndIff
Color Red on White
rem
rem The actual FORMAT Loop
rem
rem Set the color and clear the formatting information display area
rem of the screen before beginning the actual formatting. The %?
rem is the 4Dos variable that holds the result code of the Format
rem command. I test this to see whether to loop back to the start
rem of the batch file or to continue with the formatting. It will
rem detect a Control+C interrupt, improper formatting options (3½"
rem with 1.2M), and such...
rem
:DiskFormat
Color Red on White
Screen 18 00
Echo
Echo
Echo
Echo
Echo
Echo
Screen 19 00
FORMAT %Drive%: /U %Option% /AUTOTEST
If %? == 0 Goto Okay
Beep 600 4 450 1
Set Drive=
Set Size=
ScrPut 06 50 Bright White on Blue
ScrPut 07 48 Bright White on Blue
Goto Restart
:Okay
Color Bright Cyan on Blue
Beep 1000 2 900 1 1000 2 900 1 1000 2 900 1
ScrPut 18 00 Blue on White Format Another
ScrPut 18 15 Bright Blinking Yellow on White ?
Color Bright White on White
Screen 18 17
Inkey /k"YN[Enter][Esc]" %%DoIt
If "%DoIt" == "N" Goto Restart
If "%DoIt" == "" Goto The_End
echo A
GoTo DiskFormat
rem
rem The "Exit" area... Position the cursor below all the formatting
rem info and end the batch...
rem
:The_End
Color %Fore on %Back Border %Back
Screen 24 00
Quit
:Usage
Echo.
Echos Usage:
Bat_Form
[
d
|
s
] [
Echo d
|
s
]
Echo Where:
d
Is the Floppy Drive, it can be either
A
or
B
Echos s
Is the Size, it can be
1
for
1.44
Mb,
Echo 2
for
1.2
Mb
Echos
3
for
720
k,
4
for
360
Echo k, or
5
for
1.88Mb
Echo OR
you can enter
1.44
,
1.2
, ....
Echo.
Echo
It doesn't matter whether you enter the drive or size first
Echo.
Echo
Example:
Bat_Form
A
2
for a 1.2Mb floppy in the A: Drive
Echo
or
Bat_Form
1.44
B
for a 1.44Mb floppy in the B: Drive
Echo.
Color %Fore on %Back Border %Back
Quit